package NsingCHM.Email;

/** 
 Mail ��ժҪ˵����
*/
public class Mail
{
	public static void send(String to, String subject, String content)
	{
		MailMessage mail = new MailMessage();
		mail.To = to;
		mail.From = "nsingchm@163.com";
		mail.Subject = subject;
		mail.Body = content;
		mail.BodyFormat = MailFormat.Html;
		mail.Priority = MailPriority.High;
		//	mail.

		//mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendemailaddress","attilax@163.com");  //sender mail
		//	mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpaccountname","attilax@163.com"); //email account
		mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1"); //basic authentication
		mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "nsingchm"); //set your username here
		mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "loveme"); //set your password here


		SmtpMail.SmtpServer = "smtp.163.com"; //your real server goes here
		SmtpMail.Send(mail);
	}

}